44011c
@@ -254,11 +254,13 @@
public class DefaultManagementNamingStrategy implements ManagementNamingStrategy
         buffer.append(domainName).append(":");
         buffer.append(KEY_CONTEXT + "=").append(getContextId(context)).append(",");
         buffer.append(KEY_TYPE + "=" + TYPE_THREAD_POOL + ",");
-        buffer.append(KEY_NAME + "=").append(id);
+
+        String name = id;
         if (sourceId != null) {
             // provide source id if we know it, this helps end user to know where the pool is used
-            buffer.append("(").append(sourceId).append(")");
+            name = name + "(" + sourceId + ")";
         }
+        buffer.append(KEY_NAME + "=").append(ObjectName.quote(name));
         return createObjectName(buffer);
     }
 
